package com.data.app.controller;

import com.data.app.commons.constant.dto.RestResultData;
import com.data.app.service.ShareDataDisasterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @Autowired
    ShareDataDisasterService shareDataDisasterService;

    @RequestMapping("/test")
    public String test() {
        RestResultData restResultData = shareDataDisasterService.shareDataCityHouse();
        return "success";
    }

    @Value("${query.date.province}")
    String province;
    @Value("${query.date.city}")
    String city;
    @Value("${query.date.area}")
    String area;
    @Value("${query.date.table-name}")
    String tableName;
    @Value("${query.date.code}")
    String code;
    @RequestMapping("/test1")
    public String test1() {
        System.out.println(province);
        System.out.println(city);
        System.out.println(area);
        System.out.println(tableName);
        System.out.println(code);
        return "success";
    }

}
